package com.zx.mes.senior.polymorphic;

import org.junit.Test;

/**
 * 测试多态
 * @author huayunlong
 * @date 2018-7-26
 */
public class TestPolymorphic {

    @Test
    public void test(){
        Animal cat = new Cat();
        Animal dog = new Dog();

//        eat(cat);
        testxx(dog);
    }

    public void testxx(Animal animal){
        animal.eat();
    }
}
